home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2001 May / SGI IRIX Base Documentation 2001 May.iso / usr / share / catman / g_man / cat3 / ftn / nmode.z / nmode
Encoding:
Text File  |  1998-10-20  |  4.9 KB  |  133 lines

  1.  
  2.  
  3.  
  4. nnnnmmmmooooddddeeee((((3333GGGG))))                                                            nnnnmmmmooooddddeeee((((3333GGGG))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      nnnnmmmmooooddddeeee - specify renormalization of normals
  10.  
  11. FFFFOOOORRRRTTTTRRRRAAAANNNN SSSSPPPPEEEECCCCIIIIFFFFIIIICCCCAAAATTTTIIIIOOOONNNN
  12.      ssssuuuubbbbrrrroooouuuuttttiiiinnnneeee nnnnmmmmooooddddeeee((((mmmmooooddddeeee))))
  13.      iiiinnnntttteeeeggggeeeerrrr****4444 mmmmooooddddeeee
  14.  
  15. PPPPAAAARRRRAAAAMMMMEEEETTTTEEEERRRRSSSS
  16.      _m_o_d_e   expects a symbolic constant.  There are two defined constants for
  17.             this parameter:
  18.  
  19.             NNNNAAAAUUUUTTTTOOOO causes normals to be renormalized only if the current
  20.             ModelView matrix is not orthonormal. (default)
  21.  
  22.             NNNNNNNNOOOORRRRMMMMAAAALLLLIIIIZZZZEEEE causes normals to always be renormalized, regardless of
  23.             the current ModelView matrix.
  24.  
  25. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  26.      IRIS systems transform vertex normals from object-coordinates to eye-
  27.      coordinates before doing lighting calculations.  While the matrix mode is
  28.      MMMMVVVVIIIIEEEEWWWWIIIINNNN, a separate Normal matrix is maintained to support this
  29.      transformation.  The Normal matrix is the inverse transpose of the
  30.      upper-left 3 x 3 portion of the ModelView matrix.
  31.  
  32.      Transformed normals must be unit length if the lighting calculations are
  33.      to be meaningful.  Transformed normals will be unit length if 1) they
  34.      were unit length in object-coordinates, and 2) the current Normal matrix
  35.      is orthonormal (see notes).  If one or both of these conditions are not
  36.      met, the normal must be normalized (corrected to have unit length) after
  37.      it is transformed.  nnnnmmmmooooddddeeee helps the system determine when normalization
  38.      is required.
  39.  
  40.      Each time the ModelView matrix is changed, the IRIS determines whether
  41.      the resulting (inverse-transpose) Normal matrix is orthonormal or not,
  42.      and saves the result of the test as a flag.  After each normal is
  43.      transformed, both this flag and the nnnnmmmmooooddddeeee flag are tested.  If nnnnmmmmooooddddeeee is
  44.      NNNNAAAAUUUUTTTTOOOO, the normal is normalized if and only if the flag is set (i.e. the
  45.      ModelView matrix is not orthonormal).  NNNNAAAAUUUUTTTTOOOO mode is appropriate when the
  46.      model normals are known to be unit length.  If nnnnmmmmooooddddeeee is NNNNNNNNOOOORRRRMMMMAAAA, the
  47.      normal is normalized unconditionally.  NNNNNNNNOOOORRRRMMMMAAAA mode is appropriate when
  48.      the model normals may not be unit length.
  49.  
  50.      NNNNAAAAUUUUTTTTOOOO is the default nnnnmmmmooooddddeeee.
  51.  
  52.      Because normalization involves division by a computed square root, it can
  53.      adversely affect system performance.
  54.  
  55. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  56.      mmode, loadma, multma, rot, scale, transl, lmbind
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. nnnnmmmmooooddddeeee((((3333GGGG))))                                                            nnnnmmmmooooddddeeee((((3333GGGG))))
  71.  
  72.  
  73.  
  74. NNNNOOOOTTTTEEEESSSS
  75.      IRIS-4D G, GT, and GTX models, and the Personal Iris, do not support
  76.      nnnnmmmmooooddddeeee.
  77.  
  78.      nnnnmmmmooooddddeeee cannot be used while draw mode is MMMMSSSSIIIINNNNGGGGLLLL.
  79.  
  80.      On Impact and Infinite Reality NNNNAAAAUUUUTTTTOOOO is  not supported.  Normals are
  81.      always normalized.
  82.  
  83.      For our purposes a matrix is orthogonal if it transforms normals to the
  84.      same length regardless of their direction, and it is orthonormal if this
  85.      length is the same as the untransformed length.  Rotation matrixes are
  86.      always orthonormal. Scale matrixes are orthogonal but not orthonormal if
  87.      the three scale values are identical, neither orthogonal nor orthonormal
  88.      otherwise.  Uniform scale ModelView matrices can be normalized to the
  89.      identity matrix, and are therefore ignored by the Normal matrix.
  90.      Translations do not affect the upper-left 3x3 ModelView matrix, and are
  91.      therefore also ignored by the Normal matrix.
  92.  
  93.      The length of a normal is the square root of its dot product with itself.
  94.  
  95.  
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.